Skip to content

Evolve providers to support any provider type with shared model defaults#2343

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/ai-providers-compatibility-question-ad0b3a35
Apr 7, 2026
Merged

Evolve providers to support any provider type with shared model defaults#2343
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/ai-providers-compatibility-question-ad0b3a35

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Apr 7, 2026

Summary

The providers config section was previously limited to OpenAI-compatible endpoints. This evolves it into a universal provider grouping mechanism that works with any provider type and supports shared model-level defaults.

Example

providers:
  my_anthropic:
    provider: anthropic
    token_key: MY_ANTHROPIC_KEY
    max_tokens: 16384
    thinking_budget: high

agents:
  root:
    model: my_anthropic/claude-sonnet-4-5

Code changes

  • Add provider field to ProviderConfig (defaults to openai for backward compatibility)
  • Add model-level defaults: temperature, max_tokens, thinking_budget, top_p, frequency/presence_penalty, parallel_tool_calls, track_usage, provider_opts
  • Update applyProviderDefaults to propagate all new fields (model-level overrides take precedence)
  • Make base_url required only for OpenAI-compatible providers
  • Update validation, env var gathering, JSON schema, and examples

Documentation

  • Rewrite providers/custom doc as "Provider Definitions" covering all provider types with inheritance examples
  • Add "Inheriting from Provider Definitions" section to model config docs
  • Update configuration overview, nav, and introduction

Backward compatibility

Fully backward-compatible: when provider is not set, it defaults to openai, and base_url remains required for that case.

The providers config section was previously limited to OpenAI-compatible
endpoints. This evolves it into a universal provider grouping mechanism
that works with any provider type (openai, anthropic, google,
amazon-bedrock, etc.) and supports shared model-level defaults.

Code changes:
- Add 'provider' field to ProviderConfig (defaults to 'openai' for
  backward compatibility)
- Add model-level defaults: temperature, max_tokens, thinking_budget,
  top_p, frequency/presence_penalty, parallel_tool_calls, track_usage,
  provider_opts
- Update applyProviderDefaults to propagate all new fields with
  model-level overrides taking precedence
- Make base_url required only for OpenAI-compatible providers
- Update validation, env var gathering, schema, and examples

Documentation:
- Rewrite providers/custom doc as 'Provider Definitions' covering all
  provider types with inheritance examples
- Add 'Inheriting from Provider Definitions' section to model config docs
- Update configuration overview, nav, and introduction

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner April 7, 2026 12:32
@dgageot dgageot merged commit f711e4e into docker:main Apr 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants